<style>
	.form-horizontal .form-group{margin-left:0px;margin-right:0px;}
	.control-label{color:#999;font-weight:normal;}
	input[placeholder]{color:#d8d8d8;}
</style>
<input type="hidden" id="dislog_module" value="{$module}" />
<input type="hidden" id="dislog_module_id" value="{$module_id}" />
<empty name="remind_list">
	<include file="Public:nodata" />
<else />
	<volist name="remind_list" id="vo">
		<div class="ibox-content" id="row_{$vo['remind_id']}" style="border:none;margin-top: 5px;border-bottom: 1px dashed #d3d3d6;">
			<div class="row">
				<div class="col-md-1">
					<a href="javascript:void(0);" class="remind_del" rel="{$vo['remind_id']}" title="删除">
						<span class="fa fa-times-circle"></span>
					</a>
				</div>
				<div class="col-md-11" style="padding-left: 0px;">
					<label class="col-md-3 control-label">提醒内容：</label>
					<div class="col-md-9" >
						{$vo['content']}
					</div>
				</div>
				<div class="col-md-1"></div>
				<div class="col-md-11" style="padding-left: 0px;">
					<label class="col-md-3 control-label">提醒时间：</label>
					<div class="col-md-9" >
						{$vo['remind_time']|date='Y年m月d日 H:i',###}
					</div>
				</div>
			</div>
		</div>
	</volist>
</empty>
<script>
	$('.remind_del').click(function(){
		var remind_id = $(this).attr('rel');
		swal({
            title: "您确认删除该提醒吗？" ,
            type: "warning",   
            showCancelButton: true,   
            confirmButtonColor: "#DD6B55",   
            confirmButtonText: "确定",   
            closeOnConfirm: false 
        },
		function(isConfirm){
	        if (isConfirm) {
                $.ajax({
                    type:'post',
                    url: "{:U('remind/delete')}",
                    data: {remind_id: remind_id},
                    async: false,
                    success: function (data) {
                        if (data.status == 1) {
                            $('#row_'+remind_id).remove();
                            swal("操作成功！", "删除成功！", "success");
                        } else {
                            swal({
                                title: "操作失败！",
                                text:data.info,
                                type: "error"
                            })
                            return false;
                        }
                    },
                    dataType: 'json'
                });
	        } else {
	            swal("已取消","您取消了删除操作！","error");
	        }
	    });
	});
</script>